package cn.fldong.model;

import java.sql.Date;
import java.sql.Timestamp;
import java.math.BigDecimal;

/**
 * 成绩实体类，对应scores表
 */
public class Score {
    private int scoreId; // 成绩ID
    private String studentId; // 学生学号
    private String courseId; // 课程ID
    private BigDecimal score; // 分数
    private String grade; // 等级
    private Date examDate; // 考试日期
    private String examType; // 考试类型
    private int weight; // 权重(%)
    private String semester; // 学期
    private String teacher; // 授课教师
    private String remark; // 备注
    private Timestamp createdAt; // 创建时间
    private Timestamp updatedAt; // 更新时间
    
    // 无参构造函数
    public Score() {
    }
    
    // 全参构造函数
    public Score(int scoreId, String studentId, String courseId, BigDecimal score,
                String grade, Date examDate, String examType, int weight,
                String semester, String teacher, String remark,
                Timestamp createdAt, Timestamp updatedAt) {
        this.scoreId = scoreId;
        this.studentId = studentId;
        this.courseId = courseId;
        this.score = score;
        this.grade = grade;
        this.examDate = examDate;
        this.examType = examType;
        this.weight = weight;
        this.semester = semester;
        this.teacher = teacher;
        this.remark = remark;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
    }
    
    // Getters and Setters
    public int getScoreId() {
        return scoreId;
    }
    
    public void setScoreId(int scoreId) {
        this.scoreId = scoreId;
    }
    
    public String getStudentId() {
        return studentId;
    }
    
    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }
    
    public String getCourseId() {
        return courseId;
    }
    
    public void setCourseId(String courseId) {
        this.courseId = courseId;
    }
    
    public BigDecimal getScore() {
        return score;
    }
    
    public void setScore(BigDecimal score) {
        this.score = score;
    }
    
    public String getGrade() {
        return grade;
    }
    
    public void setGrade(String grade) {
        this.grade = grade;
    }
    
    public Date getExamDate() {
        return examDate;
    }
    
    public void setExamDate(Date examDate) {
        this.examDate = examDate;
    }
    
    public String getExamType() {
        return examType;
    }
    
    public void setExamType(String examType) {
        this.examType = examType;
    }
    
    public int getWeight() {
        return weight;
    }
    
    public void setWeight(int weight) {
        this.weight = weight;
    }
    
    public String getSemester() {
        return semester;
    }
    
    public void setSemester(String semester) {
        this.semester = semester;
    }
    
    public String getTeacher() {
        return teacher;
    }
    
    public void setTeacher(String teacher) {
        this.teacher = teacher;
    }
    
    public String getRemark() {
        return remark;
    }
    
    public void setRemark(String remark) {
        this.remark = remark;
    }
    
    public Timestamp getCreatedAt() {
        return createdAt;
    }
    
    public void setCreatedAt(Timestamp createdAt) {
        this.createdAt = createdAt;
    }
    
    public Timestamp getUpdatedAt() {
        return updatedAt;
    }
    
    public void setUpdatedAt(Timestamp updatedAt) {
        this.updatedAt = updatedAt;
    }
    
    @Override
    public String toString() {
        return "Score{" +
                "scoreId=" + scoreId +
                ", studentId='" + studentId + '\'' +
                ", courseId='" + courseId + '\'' +
                ", score=" + score +
                ", grade='" + grade + '\'' +
                ", examDate=" + examDate +
                ", examType='" + examType + '\'' +
                ", weight=" + weight +
                ", semester='" + semester + '\'' +
                ", teacher='" + teacher + '\'' +
                ", remark='" + remark + '\'' +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                '}';
    }
}